package com.link2room.rodimus.facade;

import com.link2room.common.jpa.result.QueryResult;
import com.link2room.rodimus.dto.param.api.*;
import com.link2room.rodimus.dto.result.base.MallGoodBaseApiDto;
import com.link2room.rodimus.entity.MallAddress;
import com.link2room.rodimus.entity.MallGoodCategory;
import com.link2room.rodimus.dto.result.base.MallOrderBaseDto;

;

/**
 * Created by VegetaKo on 2017/1/4.
 */
public interface IMallApiFacadeService {
    QueryResult<MallGoodCategory> getGoodCategorysList() throws Exception;

    QueryResult<MallGoodBaseApiDto> getGoodsList(MallGoodsApiParamDto mallGoodsApiParamDto) throws Exception;

    MallGoodBaseApiDto getGoodById(MallGoodsApiParamDto mallGoodsApiParamDto) throws Exception;

    MallGoodBaseApiDto getGoodByCode(MallGoodsApiParamDto mallGoodsApiParamDto) throws Exception;

    QueryResult<MallOrderBaseDto> getOrders(MallOrderApiParamDto mallOrderApiParamDto) throws Exception;

    MallOrderBaseDto getOrder(MallOrderApiParamDto mallOrderApiParamDto) throws Exception;

    MallOrderBaseDto newOrder(MallOrderApiParamDto mallOrderApiParamDto) throws Exception;

    QueryResult<MallAddress> getAddressList(MallAddressApiParamDto mallAddressApiParamDto) throws Exception;

    MallAddress getAddress(MallAddressApiParamDto mallAddressApiParamDto) throws Exception;

    void newAddress(MallAddressApiParamDto mallAddressApiParamDto) throws Exception;

    void deleteAddress(MallAddressApiParamDto mallAddressApiParamDto) throws Exception;

    void modifyAddress(MallAddressApiParamDto mallAddressApiParamDto) throws Exception;

    /**
     * 预下单
     * @param prepayParamDto
     * @return
     */
    MallOrderBaseDto prepay(MallOrderPrepayParamDto prepayParamDto) throws Exception;

    /**
     * 商城订单自动取消
     */
    void autoCancelOrder(MallOrderCancelParamDto paramDto) throws Exception;

}
